package com.aruba.mvvmapplication.mapper

import com.aruba.mvvmapplication.entity.MovieEntity
import com.aruba.mvvmapplication.model.MovieItemModel

/**
 * Created by aruba on 2021/9/25.
 */
class MovieEntity2ItemModelMapper : Mapper<MovieEntity, MovieItemModel> {
    override fun map(input: MovieEntity): MovieItemModel {
        return input.run {
            MovieItemModel(
                id = id,
                title = title,
                cover = cover,
                rate = rate
            )
        }
    }
}